package cn.kgc.controller.logic.system;


import cn.kgc.pojo.Jobtitle;
import cn.kgc.pojo.Quanxianinfo;
import cn.kgc.pojo.Zhiweiquanxian;
import cn.kgc.service.system.smj_zwqxService;
import com.alibaba.fastjson.JSON;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Controller
@RequestMapping("/zwqx")
public class smj_zwqxController {

    @Resource
    public smj_zwqxService zwqx;


    /**
     * 分割字符串方法
     */
    public List splitStr(String str) {
        List list = new ArrayList();
        String[] split = str.split("-");

        for (int i = 0; i < split.length; i++) {
            if (split[i] != "0"){
                System.out.println("split[i] = " + split[i]);
                list.add(Integer.valueOf(split[i]));
            }
        }
        if (list.size() == 0) {
            list.add(-1);
        }
        return list;
    }







}
